* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 600px;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    color: #333;
    font-size: 2.2em;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    color: #666;
    font-size: 1.1em;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 0.95em;
}

input[type="text"],
input[type="datetime-local"],
textarea,
select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: #fafbfc;
}

input[type="text"]:focus,
input[type="datetime-local"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.file-input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-display {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border: 2px dashed #e1e8ed;
    border-radius: 8px;
    background: #fafbfc;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-input-display:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.file-icon {
    margin-right: 10px;
    color: #667eea;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.loading {
    display: none;
    margin-right: 10px;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.user-info {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    color: #333;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.user-info::before {
    content: "👤 ";
    margin-right: 5px;
}

/* 表单验证样式 */
.form-group.error input,
.form-group.error textarea,
.form-group.error select {
    border-color: #dc3545;
    background-color: #fdf2f2;
}

.form-group.success input,
.form-group.success textarea,
.form-group.success select {
    border-color: #28a745;
    background-color: #f2f8f2;
}

.error-message {
    color: #dc3545;
    font-size: 0.85em;
    margin-top: 5px;
    display: none;
}

/* 进度条样式 */
.progress-bar {
    width: 100%;
    height: 4px;
    background: #e1e8ed;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 10px;
    display: none;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .header h1 {
        font-size: 1.8em;
    }
    
    .user-info {
        position: static;
        margin-bottom: 20px;
        text-align: center;
        border-radius: 10px;
    }
    
    body {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 15px;
    }
    
    .header h1 {
        font-size: 1.6em;
    }
    
    .submit-btn {
        padding: 12px;
        font-size: 1em;
    }
    
    input[type="text"],
    input[type="datetime-local"],
    textarea,
    select {
        padding: 10px 12px;
        font-size: 0.95em;
    }
}

/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
    .container {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .header h1 {
        color: #e2e8f0;
    }
    
    .header p {
        color: #a0aec0;
    }
    
    label {
        color: #e2e8f0;
    }
    
    input[type="text"],
    input[type="datetime-local"],
    textarea,
    select {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    input[type="text"]:focus,
    input[type="datetime-local"]:focus,
    textarea:focus,
    select:focus {
        background: #2d3748;
        border-color: #667eea;
    }
    
    .file-input-display {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .file-input-display:hover {
        background: #2d3748;
    }
}

/* 打印样式 */
@media print {
    body {
        background: none;
        padding: 0;
    }
    
    .container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .submit-btn,
    .user-info {
        display: none;
    }
}
